package com.ruoyi.his.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.his.mapper.ReVillageMapper;
import com.ruoyi.his.domain.ReVillage;
import com.ruoyi.his.service.IReVillageService;

/**
 * 村Service业务层处理
 *
 * @author Alan
 * @date 2024-03-09
 */
@Service
public class ReVillageServiceImpl implements IReVillageService
{
    @Autowired
    private ReVillageMapper reVillageMapper;

    /**
     * 查询村
     *
     * @param code 村主键
     * @return 村
     */
    @Override
    public ReVillage selectReVillageByCode(String code)
    {
        return reVillageMapper.selectReVillageByCode(code);
    }

    /**
     * 查询村列表
     *
     * @param reVillage 村
     * @return 村
     */
    @Override
    public List<ReVillage> selectReVillageList(ReVillage reVillage)
    {
        return reVillageMapper.selectReVillageList(reVillage);
    }

    /**
     * 新增村
     *
     * @param reVillage 村
     * @return 结果
     */
    @Override
    public int insertReVillage(ReVillage reVillage)
    {
        return reVillageMapper.insertReVillage(reVillage);
    }

    /**
     * 修改村
     *
     * @param reVillage 村
     * @return 结果
     */
    @Override
    public int updateReVillage(ReVillage reVillage)
    {
        return reVillageMapper.updateReVillage(reVillage);
    }

    /**
     * 批量删除村
     *
     * @param codes 需要删除的村主键
     * @return 结果
     */
    @Override
    public int deleteReVillageByCodes(String[] codes)
    {
        return reVillageMapper.deleteReVillageByCodes(codes);
    }

    /**
     * 删除村信息
     *
     * @param code 村主键
     * @return 结果
     */
    @Override
    public int deleteReVillageByCode(String code)
    {
        return reVillageMapper.deleteReVillageByCode(code);
    }
}
